package STUDENT.TRANNGUYENQUAN.OOPs.OBJECT_AND_CLASSES.Rectangle;

public class Views {

	public static void main(String[] args) {
		Rectangle rec1 = new Rectangle(4, 40, "red");
		Rectangle rec2 = new Rectangle(3.5, 35.9, "red");
		RectangleControllers controller = new RectangleControllers();
		Models model = new Models();
		if(controller.check(rec1)){
			System.out.println("Hinh chu nhat thu nhat co chieu rong, chieu dai, mau sac lan luot la: "+rec1.getWidth()+", "+rec1.getHeight()+", "+rec1.getColor());
			System.out.println("+ Chu vi hinh chu nhat thu nhat la: "+model.Perimeter(rec1));
			System.out.println("+ Dien tich hinh chu nhat thu nhat la: "+model.Area(rec1));
		}else{
			System.out.println("Thong so cua hinh chu nhat truyen vao khong thoa man yeu cau tinh toan!");
		}
		if(controller.check(rec2)){
			System.out.println("Hinh chu nhat thu hai co chieu rong, chieu dai, mau sac lan luot la: "+rec2.getWidth()+", "+rec2.getHeight()+", "+rec2.getColor());
			System.out.println("+ Chu vi hinh chu nhat thu nhat la: "+model.Perimeter(rec2));
			System.out.println("+ Dien tich hinh chu nhat thu nhat la: "+model.Area(rec2));
		}else{
			System.out.println("Thong so cua hinh chu nhat truyen vao khong thoa man yeu cau tinh toan!");
		}
	}

}
